package com.kitty.game.difu.service.handler;

import com.kitty.game.confirm.service.handler.ConfirmHandler;
import com.kitty.game.npc.message.RespAutoWalk;
import com.kitty.game.role.model.Role;
import com.kitty.game.team.message.ReqConfirmResult;
import com.kitty.mina.message.MessagePusher;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class GhostGuiChongConfirmHandler extends ConfirmHandler {

    @Override
    public void handleConfirmResult(Role role, ReqConfirmResult reqConfirmResult) {
        log.info("点击了确定");
        if ("1".equals(reqConfirmResult.getSelect())) {
            goToHuanLingTai(role);
        }
    }

    /**
     * 购买自定义时装
     */
    private void goToHuanLingTai(Role role) {
//        NPC npc = SpringUtils.getMapService().getNpc();
//        SchoolSet schoolSet = SpringUtils.getBean(SchoolService.class).getShoolSet((byte) role.getPolar());
        //#P|证道殿(61,29)::证道殿|E=我要挑战你（70—79级可挑战）@P木系掌门|M=进入证道殿#P
        //String dest = MessageFormat.format(ITEM_DEST_TEMPLATE, npc.getX(), npc.getY(), matchZDHuFaSet.getMinLevel(), matchZDHuFaSet.getMaxLevel(), schoolSet.getTypeName());
        RespAutoWalk respAutoWalk = new RespAutoWalk();
        respAutoWalk.setTaskName("");
        respAutoWalk.setDest("#P唤灵台|E=召唤鬼宠#P");
        MessagePusher.pushMessage(role, respAutoWalk);
    }
}
